package com.example.chat

import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.navigation.NavGraphBuilder
import androidx.navigation.NavHostController
import com.example.chat.navigation.NavigationController
import com.example.chat.navigation.chatNestedNavigationGraph
import com.example.featuresdk.core.AbstractFeatureSDK
import com.example.featuresdk.navigation.INavigationController

class ChatFeatureSDK: AbstractFeatureSDK() {

    companion object{
        const val FEATURE_KEY = "chat"
    }

    override fun featureKey(): String = FEATURE_KEY
    override fun featureDesc(): String = context!!.getString(R.string.chat_feature_desc)
    override fun featureIcon(selected: Boolean): Int {
        return if(selected) R.drawable.ic_presto else R.drawable.ic_presto_dark
    }

    @ExperimentalFoundationApi
    override fun buildNavigationGraph(navGraphBuilder: NavGraphBuilder, navHostController: NavHostController) {
        navGraphBuilder.chatNestedNavigationGraph(navHostController, featureKey())
    }

    override fun getNavigationController(): INavigationController = NavigationController.instance
}